package threadlocal;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ThreadPool_ {
    public static void main(String[] args) {
        System.out.println(Runtime.getRuntime().availableProcessors());
        ThreadPoolExecutor executor;
        executor = new ThreadPoolExecutor(10,15,1000, TimeUnit.DAYS,new LinkedBlockingQueue<>(2));
        executor.execute(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello world!");
            }
        });
        executor.shutdown();
        executor.shutdownNow();

    }
}
